import request from '@/utils/request'

// 查询采购企业信息列表
export function listPurchase(query) {
  return request({
    url: '/business/purchase/list',
    method: 'get',
    params: query
  })
}

// 查询已审核采购企业信息列表
export function listPurchaseCheckPass(query) {
  return request({
    url: '/business/purchase/listpass',
    method: 'get',
    params: query
  })
}

// 查询待审核采购企业信息列表
export function listPurchaseCheckWait(query) {
  return request({
    url: '/business/purchase/listwait',
    method: 'get',
    params: query
  })
}

// 查询待整改采购企业信息列表
export function listPurchaseCheckRectify(query) {
  return request({
    url: '/business/purchase/listrectify',
    method: 'get',
    params: query
  })
}

// 查询已注销采购企业信息列表
export function listPurchaseCheckCancel(query) {
  return request({
    url: '/business/purchase/listcancel',
    method: 'get',
    params: query
  })
}

// 查询采购企业信息详细
export function getPurchase(companyId) {
  return request({
    url: '/business/purchase/' + companyId,
    method: 'get'
  })
}

// 新增采购企业信息
export function addPurchase(data) {
  return request({
    url: '/business/purchase',
    method: 'post',
    data: data
  })
}

// 修改采购企业信息
export function updatePurchase(data) {
  return request({
    url: '/business/purchase',
    method: 'put',
    data: data
  })
}

// 删除采购企业信息
export function delPurchase(companyId) {
  return request({
    url: '/business/purchase/' + companyId,
    method: 'delete'
  })
}
